package com.njtoyo.taxi.admin.service.platform.impl;

import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njtoyo.taxi.admin.library.Const;
import com.njtoyo.taxi.admin.mapper.secondary.mapper.OperationRecordMapper;
import com.njtoyo.taxi.admin.rest.presenter.platfrom.OperationRecordPresenter;
import com.njtoyo.taxi.admin.rest.wrapper.platform.OperationRecordLogWrapper;
import com.njtoyo.taxi.admin.service.platform.OperationRecordService;
import com.taxi.entity.common.RestResult;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@DS(Const.SECONDARY_DS)
public class OperationRecordServiceImpl implements OperationRecordService {
    @Autowired
    private OperationRecordMapper operationRecordMapper;

    /**
     * 操作日志列表
     *
     * @param operationRecordLogWrapper
     * @return
     */
    @Override
    public RestResult<Page<OperationRecordPresenter>> operationLogList(OperationRecordLogWrapper operationRecordLogWrapper) {
        Page<OperationRecordPresenter> listLog = operationRecordMapper.getListLog(operationRecordLogWrapper);
        return RestResult.success(listLog);
    }
}
